Field of the Invention
The present invention relates to a focus detecting apparatus capable of object tracking processing and focus detection, and a method of controlling the focus detecting apparatus to perform auto-focus (AF).
Description of the Related Art
Conventional image capturing apparatus, such as a digital still camera, has a function of extracting an arbitrary object image from continuously captured images to track the object being detected in each image. Automatic focusing (AF) and automatic exposure (AE) processing are performed based on the position of an object image detected in each image. In a known method for tracking an object, an object is searched by template matching using contrast levels of a region of an object image in an image as a template. However, when a region of an image with low contrast, such as a region of an image corresponding to a person wearing a plain clothing, is set as a tracking target, focus detection becomes difficult because a region with low contrast is continuously detected.
It is known that when a tracking target is set by a user touching a display screen, such as a liquid crystal, an area for focus detection is set based on the region of the tracking target. In such a case, an object that the user does not intend to focus on might be set as a tracking target if, for example, the contour of an object is touched or a finger covers an object when touching the display screen. If the contrast of an object set as a tracking target is low, in this case, focus detection becomes difficult and focusing may not be possible.
Japanese Patent Laid-Open No. 2009-186914 discloses a technique that sets a focus detection region based on a tracking frame and inhibits tracking of an object when an initial in-focus position is undetectable.
In the technique disclosed in Japanese Patent Laid-Open No. 2009-186914, neither tracking nor AF control is performed when focus detection is not performed correctly because of, for example, low contrast of an object selected by a user.